#include <bits/stdc++.h>
using namespace std;

int a[1001];

int main(int argc, char const *argv[])
{
    int cnt=0;
    int max=INT_MIN;

    int n;
    cin >> n;
    for(int i=1; i<=n; i++)
    {
        cin >> a[i];

        if(i>1 && a[i]==a[i-1])
            cnt++;
        else   
            cnt = 1;

        max = max>cnt ? max : cnt;
    }
    cout << max << endl;

    return 0;
}